import 'package:blurrycontainer/blurrycontainer.dart';
import 'package:flutter/material.dart';

import '../button/my_switch.dart';

///zhudaihao
///2024-1-30
///底部弹框

class PopUpUtil {
  ///单选按钮
  static Future<void> showTemperatureUnit(BuildContext context,
      {@required String? leftText,
      @required String? rightText,
      bool isDefaultCheck = true,
      Function(String v)? onCLick}) async {
    showModalBottomSheet(
      context: context,
      backgroundColor: Colors.transparent,
      builder: (ctx) => BlurryContainer(
        color: Colors.white.withOpacity(0.15),
        blur: 8,
        elevation: 6,
        borderRadius: const BorderRadius.only(
            topLeft: Radius.circular(24), topRight: Radius.circular(24)),
        child: MySwitch(
            leftText: leftText,
            rightText: rightText,
            isDefaultCheck: isDefaultCheck,
            onCLick: onCLick),
      ),
    );
  }
}
